package run.leven.notice.starter.util;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import run.leven.notice.starter.common.Constants;


/**
 * @author leven
 * @date 2020/3/30 1:54
 */
@Component
@Slf4j
public class NoticeReceiver {

    @RabbitListener(queues = {Constants.DLX_EMAIL_NOTICE})
    @RabbitHandler
    public void emailReceiverExpiration(String message){
        log.info("延迟接受邮件");
        System.out.println("延迟接受邮件：" + message);
    }
}
